# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=plfit
pkgver=0.9.4
pkgrel=1
pkgdesc='Fitting power-law distributions to empirical data'
arch=(loong64 x86_64)
url='https://github.com/ntamas/plfit'
license=(GPL2)
depends=(glibc)
makedepends=(cmake)
source=(https://github.com/ntamas/plfit/archive/$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('308fa174235f44dd4b32fefd5dce06bae20dfb96046d413c27faea7b1e9427d6')

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBUILD_SHARED_LIBS=ON
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
